ArcPad Scripting Object Model Reference > ArcPad Scripting Samples > List Forms Example |
LayerForms determines if there is an Edit Form and/or Identify Form attached to a layer. It also determines the number of other layer forms, if any.
Copy Code | |
---|---|
Sub LayerForms (objLayer, blnEForm, blnIForm, intOForms) Dim objFrm 'Initialize arguments blnEForm = False blnIForm = False intOForms = 0 If Not (objLayer.Forms.Count = 0) Then For Each objFrm in objLayer.Forms If objFrm.Name = "EditForm" Then blnEForm = True Elseif objFrm.Name = "IdentifyForm" Then blnIForm = True Else intOForms = intOForms + 1 End If Next End If MsgBox "Edit Form? " & CStr(blnEForm) & VBCr &_ "Identify Form? " & CStr(blnIForm) & VBCr &_ "# Other Forms: " & CStr(intOForms) _ , vbInformation, "Layer " & objLayer.Name End Sub |